#pragma once
#include "../../StdAfx.h"

#include "AseStructure.h"

enum DATA_TYPE
{
    NULL_DATA = 0,
	INT_DATA,
	FLOAT_DATA,
	STRING_DATA,
	STRING2_DATA,
	VECTOR_DATA,
	COLOR_DATA,
	FACE_DATA,
	MATRIX_DATA,
};

class CAseLoadMng
{
public:
	FILE*				m_pFile;

    char				m_pBuffer[MAX_PATH];
	char				m_pString[MAX_PATH];    

public:
	bool	LoadAseFile( char* pFileName , int* pNumMaterial , CAseStructure* pObject );

	bool	GetSceneData( CAseStructure* pObject );
	bool	GetMaterialData( CAseStructure* pObject , int* pNumMaterial );
	bool	GetGeomObjectData( CAseStructure* pObject , int* pNumMaterial );
	bool	GetGeomObjectMeshData( CAseStructure* pObject , GEOMOBJECT* pGeomObject , int* pNumMaterial );
	bool	GetGeomObjectAnimation( CAseStructure* pObject , GEOMOBJECT* pGeomObject );
	bool	GetGeomObjectPosTrack( CAseStructure* pObject , POSTRACK* pTrack );
	bool	GetGeomObjectRotTrack( CAseStructure* pObject , ROTTRACK* pTrack );
	bool	GetGeomObjectScaleTrack( CAseStructure* pObject , SCALETRACK* pTrack );

	int		CheckTextureMapData();

    // Util

	bool	GetDataFromFile( char* pString = NULL , void* pData = NULL , DATA_TYPE nType = NULL_DATA  , char* pEndStr = "}" );
	bool	EndData( char* pDestString , char* pSrcString = NULL );


public:
	CAseLoadMng(void);
	~CAseLoadMng(void);
};
